package com.lagou.service;/*
 *Author:cxz
 *@Date:${Date}
 */

import java.io.IOException;

/**
 * @ClassName Serializer
 * @Description
 * @Author cxz
 * @Date 2020/5/28 12:53 Version V1.0
 */
public interface Serializer {

    /**
     * java对象转换为二进制
     */

    byte[] serialize(Object object) throws IOException;


    /**
     * 二进制转换成java对象
     */

    <T> T deserialize(Class<T> clazz, byte[] bytes) throws IOException;
}
